<?php get_header(); ?>





<?php if (have_posts()) : while (have_posts()) : the_post(); ?>



    <?php
    $categories = get_the_category();

    $categoryIDS = array();

    foreach ($categories as $category) {
      array_push($categoryIDS, $category->term_id);
    }

    $categoryIDS = implode(",", $categoryIDS);

    ?>








<div class="top">
    <div class="main">
      <div class="topbox toppostbox">
        <p><?phpforeach((get_the_category()) as $category){echo $category->cat_name;}?><br />
          <i><?php the_title(); ?></i>
        </p>
      </div>
    </div>
  </div>

  <div class="postbox">
    <div class="main">
      <div class="postboxs">

      
        <!-- <div class="postboxsimg">
          <img src="./img/post/1.jpg">
        </div> -->

        <div class="postboxsmain">
          <div class="postboxsbt">Nano Gateway</div>


          <div class="postboxsnr">
           <?php the_content(""); ?>
          </div>
        </div>

        <div class="clear"></div>
        <div class="fy">
        <?php



$next_post = get_next_post($categoryIDS);



if (!empty($next_post)) : ?>
  <a href="<?php echo get_permalink($next_post->ID); ?>"><i class="fyl"></i><span>Previous Product</span></a>
  <script language="javascript">
    psUtl.bindKey(['LEFT'], function() {
      location = '<?php echo get_permalink($next_post->ID); ?>';
    })
  </script>
<?php endif; ?>




<?php
$prev_post = get_previous_post($categoryIDS);
if (!empty($prev_post)) : ?>
  <em></em>
  <a href="<?php echo get_permalink($prev_post->ID); ?>" class="page_next "><span>Next Product</span><i class="fyr"></i></a>
  <script language="javascript">
    psUtl.bindKey(['RIGHT'], function() {
      location = '<?php echo get_permalink($prev_post->ID); ?>';
    })
  </script>

<?php endif; ?>

          <div class="clear"></div>
        </div>
        <div class="clear"></div>

      </div>


    </div>
  </div>



  <div class="clear"></div>











    <?php endwhile;
else : ?><?php endif; ?>



    <?php get_footer(); ?>